<?php
ini_set("soap.wsdl_cache_enabled","0");

$service  = new SoapClient("http://208.74.72.210:8080/EnticeWS/services/billing3?wsdl");

$key = 'pass';
$key = mkResllerKey($key);

//041565409351933
//$data = $service->getSubscriber('12',$key, '04128582369454235');

$xmlDidHistory  = '<?xml version="1.0" encoding="UTF-8"?>
   <EnticeRequest>
     <data>
       <row>
         <filter>RESELLER_ID|=|12</filter>
         <sortBy>DID_NUMBER|ASC</sortBy>
         <pageNumber>1</pageNumber>
         <pageSize>15</pageSize>
       </row>
     </data>
   </EnticeRequest>';

$email  = "rush@xclnetworks.com";

$isBillingAddress = false;
$userId = 'bao';


$start_date = new stdClass();
$start_date->startDate ='2/2/2005 00:00:00';


$end_date = new stdClass();
$end_date->endDate = '2/2/2010 00:00:00';


$data = $service->getDidHistory('12',$key, $xmlDidHistory);

header('Content-type: text/xml');
echo ( $data);

function mkResllerKey($key)
{
	$dt = gmdate("m/d/Y", time());
	$key =substr($dt,0,6).$key.substr($dt, 5);
	return md5($key);
}